<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>欢迎页</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap.min.css">
</head>
<body>
	<div id="rrapp" v-cloak>
		<div class="panel panel-default">
			<div class="panel-heading">统计信息</div>
			<div class="panel-body">
				<div class="col-xs-6 col-md-4">
					<div class="panel panel-default text-center">
						<h4>会员总数</h4>
						<h3>{{entity.members}}</h3>
					</div>
				</div>
				<div class="col-xs-6 col-md-4">
					<div class="panel panel-default text-center">
						<h4>今日注册会员</h4>
						<h3>{{entity.todayMembers}}</h3>
					</div>
				</div>
				<div class="col-xs-6 col-md-4">
					<div class="panel panel-default text-center">
						<h4>虚拟币总数</h4>
						<h3>{{entity.totalBalance}}</h3>
					</div>
				</div>
				<div class="col-xs-6 col-md-4">
					<div class="panel panel-default text-center">
						<h4>运行中矿机数</h4>
						<h3>{{entity.runningMachine}}</h3>
					</div>
				</div>
				<div class="col-xs-6 col-md-4">
					<div class="panel panel-default text-center">
						<h4>今日购买矿机</h4>
						<h3>{{entity.todayMachine}}</h3>
					</div>
				</div>
				<div class="col-xs-6 col-md-4">
					<div class="panel panel-default text-center">
						<h4>今日成交笔数</h4>
						<h3>{{entity.orders}}</h3>
					</div>
				</div>
				<div class="col-xs-6 col-md-4">
					<div class="panel panel-default text-center">
						<h4>今日成交总额(CNY)</h4>
						<h3>{{entity.totalAmount}}</h3>
					</div>
				</div>
				<div class="col-xs-6 col-md-4">
					<div class="panel panel-default text-center">
						<h4>今日成交总币数</h4>
						<h3>{{entity.totalCoinAmount}}</h3>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
<script src="${request.contextPath}/statics/libs/jquery.min.js"></script>
<script src="${request.contextPath}/statics/libs/vue.min.js"></script>
<script src="${request.contextPath}/statics/libs/bootstrap.min.js"></script>
<script type="text/javascript">
	var vm = new Vue({
		el : '#rrapp',
		data : {
			entity : {}
		},
		created : function() {
			this.main();
		},
		methods : {
			main : function() {
				$.ajax({
					type: "POST",
				    url: "${request.contextPath}/aic/index/main",
	                contentType: "application/json",
				    success: function(r){
				    	if(r.code === 0){
				    		vm.entity = r;
						} else {
							alert(r.msg);
						}
					}
				});
			}
		}
	});
</script>
</html>